/////////////////////////////////////////////////////////////////////////////
// Name:        dgt_MainFrame.cpp
// Purpose:     
// Author:      Aleksey Plotnikov & Alla Nabatova
// Modified by: 
// Created:     21/03/2008 08:50:16
// RCS-ID:      
// Copyright:   Diamant Software
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "dgt_MainFrame.h"
#endif

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
#include "dgt_pluginmanagerdlg.h"
////@end includes

#include "dgt_MainFrame.h"

////@begin XPM images

////@end XPM images


/*!
 * dgt_MainFrame type definition
 */

IMPLEMENT_CLASS( dgt_MainFrame, wxFrame )


/*!
 * dgt_MainFrame event table definition
 */

BEGIN_EVENT_TABLE( dgt_MainFrame, wxFrame )

////@begin dgt_MainFrame event table entries
    EVT_MENU( ID_PLUGINDIALOG, dgt_MainFrame::OnPlugindialogClick )

////@end dgt_MainFrame event table entries

END_EVENT_TABLE()


/*!
 * dgt_MainFrame constructors
 */

dgt_MainFrame::dgt_MainFrame()
{
    Init();
}

dgt_MainFrame::dgt_MainFrame( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    Init();
    Create( parent, id, caption, pos, size, style );
}


/*!
 * dgt_MainFrame creator
 */

bool dgt_MainFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin dgt_MainFrame creation
    wxFrame::Create( parent, id, caption, pos, size, style );

    CreateControls();
    Centre();
////@end dgt_MainFrame creation
    return true;
}


/*!
 * dgt_MainFrame destructor
 */

dgt_MainFrame::~dgt_MainFrame()
{
////@begin dgt_MainFrame destruction
////@end dgt_MainFrame destruction
}


/*!
 * Member initialisation
 */

void dgt_MainFrame::Init()
{
////@begin dgt_MainFrame member initialisation
////@end dgt_MainFrame member initialisation
}


/*!
 * Control creation for dgt_MainFrame
 */

void dgt_MainFrame::CreateControls()
{    
////@begin dgt_MainFrame content construction
    dgt_MainFrame* itemFrame1 = this;

    wxMenuBar* menuBar = new wxMenuBar;
    wxMenu* itemMenu3 = new wxMenu;
    wxMenu* itemMenu4 = new wxMenu;
    itemMenu3->Append(ID_MENU1, _("Menu"), itemMenu4);
    menuBar->Append(itemMenu3, _("File"));
    wxMenu* itemMenu5 = new wxMenu;
    menuBar->Append(itemMenu5, _("Edit"));
    wxMenu* itemMenu6 = new wxMenu;
    itemMenu6->Append(ID_PLUGINDIALOG, _("Plugin dialog"), _T(""), wxITEM_NORMAL);
    menuBar->Append(itemMenu6, _("Plugins"));
    wxMenu* itemMenu8 = new wxMenu;
    menuBar->Append(itemMenu8, _("Help"));
    itemFrame1->SetMenuBar(menuBar);

    wxToolBar* itemToolBar9 = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, ID_TOOLBAR1 );
    itemToolBar9->Realize();
    itemFrame1->SetToolBar(itemToolBar9);

    wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
    itemFrame1->SetSizer(itemBoxSizer10);

    wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer10->Add(itemBoxSizer11, 1, wxGROW|wxALL, 5);

    wxPanel* itemPanel12 = new wxPanel( itemFrame1, ID_PANEL5, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    itemBoxSizer11->Add(itemPanel12, 1, wxGROW|wxALL, 5);

    wxAuiNotebook* itemAuiNotebook13 = new wxAuiNotebook( itemFrame1, ID_AUINOTEBOOK2, wxDefaultPosition, wxDefaultSize, wxAUI_NB_DEFAULT_STYLE );

    wxPanel* itemPanel14 = new wxPanel( itemAuiNotebook13, ID_PANEL6, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    wxSplitterWindow* itemSplitterWindow15 = new wxSplitterWindow( itemPanel14, ID_SPLITTERWINDOW1, wxDefaultPosition, wxSize(100, 100), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER );
    itemSplitterWindow15->SetMinimumPaneSize(0);

    wxPanel* itemPanel16 = new wxPanel( itemSplitterWindow15, ID_PANEL7, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );

    wxPanel* itemPanel17 = new wxPanel( itemSplitterWindow15, ID_PANEL8, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );

    itemSplitterWindow15->SplitVertically(itemPanel16, itemPanel17, 50);

    itemAuiNotebook13->AddPage(itemPanel14, _("Tab"), false);

    itemBoxSizer11->Add(itemAuiNotebook13, 1, wxGROW|wxALL, 5);

////@end dgt_MainFrame content construction
}


/*!
 * wxEVT_COMMAND_MENU_SELECTED event handler for ID_PLUGINDIALOG
 */

void dgt_MainFrame::OnPlugindialogClick( wxCommandEvent& event )
{
////@begin wxEVT_COMMAND_MENU_SELECTED event handler for ID_PLUGINDIALOG in dgt_MainFrame.
    // Before editing this code, remove the block markers.
    dgt_PluginManagerDlg* window = new dgt_PluginManagerDlg(this, ID_DGT_PLUGINMANAGERDLG, _("dgt_PluginManagerDlg"));
    window->Show(true);
////@end wxEVT_COMMAND_MENU_SELECTED event handler for ID_PLUGINDIALOG in dgt_MainFrame. 
}


/*!
 * Should we show tooltips?
 */

bool dgt_MainFrame::ShowToolTips()
{
    return true;
}

/*!
 * Get bitmap resources
 */

wxBitmap dgt_MainFrame::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin dgt_MainFrame bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end dgt_MainFrame bitmap retrieval
}

/*!
 * Get icon resources
 */

wxIcon dgt_MainFrame::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin dgt_MainFrame icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end dgt_MainFrame icon retrieval
}
